package com.raven.craft.code.generator.common.util;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author raven
 * @date 2018-10-23 23:17
 */
public class DateUtil {

    public static final String FORMAT_TIMESTAMP = "yyyyMMddHHmmss";
    public static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(FORMAT_TIMESTAMP);

    public static String getTimestamp() {
        LocalDateTime now = LocalDateTime.now();
        return now.format(formatter);
    }
}
